home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Warrior’s Progress / source code / Source / Libraries / Drawing / TemporaryPort.h < prev    next >
Encoding:
Text File  |  1997-06-28  |  512 b   |  30 lines  |  [TEXT/CWIE]

  1. // TemporaryPort.h
  2.  
  3. #ifndef TemporaryPort_h
  4. #define TemporaryPort_h
  5.  
  6. class GrafPortObject;
  7.  
  8. class TemporaryPort
  9.   {
  10.     private:
  11.         GrafPortObject& old;
  12.         CGrafPort personal;
  13.         GrafPortObject *toUse;
  14.         
  15.         static bool sharedPortBusy;
  16.         
  17.         // not implemented:
  18.             TemporaryPort( const TemporaryPort& );
  19.             void operator=( const TemporaryPort& );
  20.         
  21.     public:
  22.         TemporaryPort();
  23.         ~TemporaryPort();
  24.         
  25.         const GrafPortObject& Port() const        { return *toUse; }
  26.         GrafPortObject& Port()                        { return *toUse; }
  27.   };
  28.  
  29. #endif
  30.